package com.leyou.client;

import com.leyou.dto.AddressDTO;
import com.leyou.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Eric
 * @version v1.0
 * @package com.leyou.client
 * @date 2019/7/7 19:12
 * @description:
 **/
@FeignClient("user-service")
public interface UserClient {

    @GetMapping("query")
    UserDTO query(@RequestParam("username") String username, @RequestParam("password") String password);


    /**
     * 根据
     *
     * @param userId 用户id
     * @param id     地址id
     * @return 地址信息
     */
    @GetMapping("/address")
    AddressDTO queryAddressById(@RequestParam("userId") Long userId, @RequestParam("id") Long id);
}
